// -----------------------------------------------
// Author:     code34 nicolas_boiteux@yahoo.fr
// Edited by:  Neumatic
// Warcontext: Get an object by its editor ID
// Example:    [172851] execVM "WC_fnc_getobject.sqf";
// -----------------------------------------------

private ["_objectid","_markersize","_markername","_position","_marker","_object"];

_objectid = _this select 0;

_markersize = 1;
_markername = "getobject";
_position = [0,0];

_marker = [_markername, _markersize, _position, "ColorBlue", "ELLIPSE", "FDIAGONAL"] call WC_fnc_createmarkerlocal;
_object = (getMarkerPos _marker) nearestObject _objectid;
deleteMarkerLocal _marker;

_object;